package com.zit.util;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.json.JSONException;
import org.apache.struts2.json.JSONUtil;

import com.zit.entity.Profession;

public class InitData {

	public static void main(String[] args) throws JSONException {
		Profession t1 = new Profession();
		t1.setId(1);
		t1.setName("aaa");
		Profession t2 = new Profession();
		t2.setId(2);
		t2.setName("bbb");
		
		List<Profession> list = new ArrayList<Profession>();
		list.add(t1);
		list.add(t2);
		
		String s = JSONUtil.serialize(list);
		System.out.println(s);
	}

}
